package com.ibeeking.found.id.rest.controller.v1;


import com.ibeeking.found.id.api.feign.IdFeignClient;
//import com.ibeeking.found.id.api.feign.SerialNoRuleFeignClient;
import com.ibeeking.found.id.rest.redis.RedisIdTemplate;
import com.ibeeking.found.id.rest.service.ISerialNoRuleGenerateService;
import com.ibeeking.nematos.redis.utils.RedisUtils;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/id")
public class TestController {

    @Resource
    private ISerialNoRuleGenerateService serialNoRuleGenerateServiceImpl;

    //@Resource
    //private SerialNoRuleFeignClient serialNoRuleFeignClient;

    @Resource
    private IdFeignClient idFeignClient;

    @Resource
    private RedisIdTemplate redisIdTemplate;

    @Resource
    private RedisUtils redisUtils;



    @GetMapping(value = "/test")
    public void test(){

        System.out.println("ck" + redisIdTemplate.next("CKK", 8, new Long(10001)));
        Object  ddddddd  =  redisUtils.get("KKK");
        //ResponseResult<String> dfd = serialNoRuleFeignClient.generateSerialNo("CONT");

        ResponseResult<List<Object>> dddd = idFeignClient.selectIds(3);

       // System.out.println("合同号：" + dfd.getData());

       // String ssss = serialNoRuleGenerateServiceImpl.generateSerialNo("MEMBER");
       // System.out.println("会员卡号：" + ssss);
        System.out.println("ck" + redisIdTemplate.next("CKK", 8, new Long(10001)));
    }
}
